/**
 * 
 */
package com.easidea.tim.entity.customer;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springside.core.dao.extend.Undeletable;

import com.easidea.tim.entity.BaseEntity;

/**
 * 客户财务对账信息记录，目前一个客户只有一条数据，新增时由前端对数据进行格式化处理
 * 
 * @author Harrison
 *
 */

@Entity(name="tim_customer_customer_account_memo")
@org.hibernate.annotations.Entity(dynamicInsert=true, dynamicUpdate=true)
@Undeletable(status="deleted")
@Cache(region="tim_customer_customer_account_memo", usage=CacheConcurrencyStrategy.READ_WRITE)
public class CustomerAccountMemo extends BaseEntity {

	private String memo;
	private Customer customer;
	/**
	 * @return the memo
	 */
	@Column(name="memo",length=5000,nullable=false)
	public String getMemo() {
		return memo;
	}
	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}
	/**
	 * @return the customer
	 */
	@ManyToOne(cascade=CascadeType.REMOVE,fetch=FetchType.LAZY)
	@JoinColumn(name="customer_id")
	public Customer getCustomer() {
		return customer;
	}
	/**
	 * @param customer the customer to set
	 */
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
}
